package com.daisuxia.web.pojo.fuyou;

import com.daisuxia.back.utils.SysCacheUtils;
import com.daisuxia.web.pojo.BackConfigParams;
import com.fuiou.util.MD5;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Map;

/**
 * Created by IntelliJ IDEA
 * User : zhangsh
 * Date : 2016/12/26 0026
 * Time : 18:00
 */
@XmlRootElement(name = "ORDER")
@XmlAccessorType(XmlAccessType.FIELD)
public class MobilePaySend {
    private String MCHNTCD;
    private String TYPE;
    private String VERSION = "2.0";
    private String LOGOTP;
    private String MCHNTORDERID;
    private String USERID;
    private String AMT;
    private String BANKCARD;
    private String NAME;
    private String IDTYPE;
    private String IDNO;
    private String BACKURL;
    private String HOMEURL;
    private String REURL;
    private String REM1;
    private String REM2;
    private String REM3;
    private String SIGNTP;
    private String SIGN;

    public String getVERSION() {
        return VERSION;
    }

    public void setVERSION(String VERSION) {
        this.VERSION = VERSION;
    }

    public String getLOGOTP() {
        return LOGOTP;
    }

    public void setLOGOTP(String LOGOTP) {
        this.LOGOTP = LOGOTP;
    }

    public String getMCHNTCD() {
        return MCHNTCD;
    }

    public void setMCHNTCD(String MCHNTCD) {
        this.MCHNTCD = MCHNTCD;
    }

    public String getTYPE() {
        return TYPE;
    }

    public void setTYPE(String TYPE) {
        this.TYPE = TYPE;
    }

    public String getMCHNTORDERID() {
        return MCHNTORDERID;
    }

    public void setMCHNTORDERID(String MCHNTORDERID) {
        this.MCHNTORDERID = MCHNTORDERID;
    }

    public String getUSERID() {
        return USERID;
    }

    public void setUSERID(String USERID) {
        this.USERID = USERID;
    }

    public String getAMT() {
        return AMT;
    }

    public void setAMT(String AMT) {
        this.AMT = AMT;
    }

    public String getBANKCARD() {
        return BANKCARD;
    }

    public void setBANKCARD(String BANKCARD) {
        this.BANKCARD = BANKCARD;
    }

    public String getNAME() {
        return NAME;
    }

    public void setNAME(String NAME) {
        this.NAME = NAME;
    }

    public String getIDTYPE() {
        return IDTYPE;
    }

    public void setIDTYPE(String IDTYPE) {
        this.IDTYPE = IDTYPE;
    }

    public String getIDNO() {
        return IDNO;
    }

    public void setIDNO(String IDNO) {
        this.IDNO = IDNO;
    }

    public String getBACKURL() {
        return BACKURL;
    }

    public void setBACKURL(String BACKURL) {
        this.BACKURL = BACKURL;
    }

    public String getHOMEURL() {
        return HOMEURL;
    }

    public void setHOMEURL(String HOMEURL) {
        this.HOMEURL = HOMEURL;
    }

    public String getREURL() {
        return REURL;
    }

    public void setREURL(String REURL) {
        this.REURL = REURL;
    }

    public String getREM1() {
        return REM1;
    }

    public void setREM1(String REM1) {
        this.REM1 = REM1;
    }

    public String getREM2() {
        return REM2;
    }

    public void setREM2(String REM2) {
        this.REM2 = REM2;
    }

    public String getREM3() {
        return REM3;
    }

    public void setREM3(String REM3) {
        this.REM3 = REM3;
    }

    public String getSIGNTP() {
        return SIGNTP;
    }

    public void setSIGNTP(String SIGNTP) {
        this.SIGNTP = SIGNTP;
    }

    public String getSIGN() {
        return SIGN;
    }

    public void setSIGN(String SIGN) {
        this.SIGN = SIGN;
    }

    public String toSign(){
        Map<String, String> keys = SysCacheUtils.getConfigParams(BackConfigParams.FUYOU);
        String key = keys.get("KEY");
        return MD5.MD5Encode(TYPE + "|" + VERSION + "|" + MCHNTCD + "|" + MCHNTORDERID + "|" + USERID + "|" + AMT + "|" + BANKCARD + "|" + BACKURL
                + "|" + NAME + "|" + IDNO + "|" + IDTYPE + "|" + LOGOTP + "|" + HOMEURL + "|" + REURL + "|" + key);
    }

	@Override
	public String toString() {
		return "MobilePaySend [MCHNTCD=" + MCHNTCD + ", TYPE=" + TYPE
				+ ", VERSION=" + VERSION + ", LOGOTP=" + LOGOTP
				+ ", MCHNTORDERID=" + MCHNTORDERID + ", USERID=" + USERID
				+ ", AMT=" + AMT + ", BANKCARD=" + BANKCARD + ", NAME=" + NAME
				+ ", IDTYPE=" + IDTYPE + ", IDNO=" + IDNO + ", BACKURL="
				+ BACKURL + ", HOMEURL=" + HOMEURL + ", REURL=" + REURL
				+ ", REM1=" + REM1 + ", REM2=" + REM2 + ", REM3=" + REM3
				+ ", SIGNTP=" + SIGNTP + ", SIGN=" + SIGN + "]";
	}
}
